<?php
namespace app\index\controller;

use app\model\ArticleModel;
use app\model\CommentModel;
use think\facade\Request;
use think\facade\View;

class article{
    public function detail(){
        //获取文章表
        $articleid = Request::param('article_id') ?? '';
        $articleList = ArticleModel::limit(4)->select();
        $article = ArticleModel::order('add_time','desc')->limit(6)->select();
        View::assign('article',$article);
        View::assign('articleid',$articleid);
        View::assign('articleList',$articleList);
        return View::fetch();
    }

}